package Common;

/** 
 ImageProcess ��ժҪ˵����
*/
public class ImageProcess
{
	public ImageProcess()
	{
		//
		// TODO: �ڴ˴���ӹ��캯���߼�
		//
	}

	/** 
	 ��byte[]ת��ΪImage
	 
	 �ֽ�����
	 Image
	*/
//C# TO JAVA CONVERTER WARNING: Unsigned integer types have no direct equivalent in Java:
//ORIGINAL LINE: public static Image ConvertByteToImage(byte[] bytes)
	public static Image ConvertByteToImage(byte[] bytes)
	{
		MemoryStream ms = new MemoryStream(bytes,0,bytes.length);
		BinaryFormatter bf = new BinaryFormatter();
		Object obj = bf.Deserialize(ms);
���� ms.Close();
���� return(Image)obj;
	}
	/** 
	 ��Imageת��Ϊbyte[]
	 
	 Image
	 byte[]
	*/
//C# TO JAVA CONVERTER WARNING: Unsigned integer types have no direct equivalent in Java:
//ORIGINAL LINE: public static byte[] ConvertImageToByte(Image image)
	public static byte[] ConvertImageToByte(Image image)
	{
		MemoryStream ms = new MemoryStream();
		BinaryFormatter bf = new BinaryFormatter();
		bf.Serialize(ms,(Object)image);
		ms.Close();

		return ms.ToArray();
	}
}